package com.ruoyi.lm.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.EmptyUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.lm.domain.LmBanner;
import com.ruoyi.lm.service.ILmBannerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 首页轮播Controller
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Controller
@RequestMapping("/phone/lm/banner")
public class LmBannerControllerPhone extends BaseController
{
    private String prefix = "/phone/lm/banner";

    @Autowired
    private ILmBannerService lmBannerService;

    /**
     * 查询首页轮播列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(LmBanner lmBanner)
    {
        List<LmBanner> list = lmBannerService.selectLmBannerList(lmBanner);
        return getDataTable(list);
    }
}
